import { Component, OnInit } from '@angular/core';
import { AppserService } from '../../../appser.service';

@Component({
  selector: 'app-test1-c',
  templateUrl: './test1-c.component.html',
  styleUrls: ['./test1-c.component.scss']
})
export class Test1CComponent implements OnInit {

  publicMsg = this.appserService.testMsg;
  constructor(
    private appserService: AppserService,
  ) { }

  ngOnInit() {
    console.log('appser-c 打印', this.appserService.testMsg);
    this.appserService.testMsg = 'test1-b 修改了值';
  }

}
